// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) fieldsfirst ansi space 
// Source File Name:   JDiyUtil.java

package com.hg.util.db;

import java.net.URL;
import org.apache.log4j.Logger;
import org.jdiy.core.Dao;
import org.jdiy.core.JDiyContext;
import org.jdiy.util.Fs;

public class JDiyUtil
{

	static Logger logger;
	private static JDiyContext jdc = null;

	public JDiyUtil()
	{
	}

	public static Dao getDAO()
	{
		return jdc.getDao();
	}

	public static String getProp(String arg0)
	{
		return jdc.getProp(arg0);
	}

/*	public static void main(String args[])
	{
		System.out.println(getProp("tb_content"));
	}*/

	static 
	{
		logger = Logger.getLogger(com.hg.util.db.JDiyUtil.class);
		try
		{
			URL xmlLocation = Fs.getResource("jdiy.xml");
			String rootPath = Fs.getResource("/").getPath();
			jdc = JDiyContext.newInstance(xmlLocation, rootPath);
		}
		catch (Exception e)
		{
			
		}
	}
}
